module.exports = {
  title: "寒梦的博客",
  description: "盛年不重来,一日难再晨,及时当勉励,岁月不待人",
  head: [
    ["link", { rel: "icon", href: "/logo.png" }], // 增加一个自定义的 favicon(网页标签的图标)
  ],
  base: "/myblog/",
  theme: "reco",
  themeConfig: {
    nav: [
      {
        text: "JS",
        link: "/jsstudy",
        items: [
          {
            text: "Promise",
            link: "https://www.zhihu.com/column/c_1415231566645350400",
          },
          {
            text: "浏览器对象详解",
            link: "https://zhuanlan.zhihu.com/p/365044710",
          },
          { text: "DOM操作", link: "/jsstudy/dom" },
          { text: "this指向、闭包、作用域", link: "/jsstudy/Closure" },
          { text: "事件循环", link: "https://zhuanlan.zhihu.com/p/398609427" },
          { text: "冒泡和捕获", link: "/jsstudy/bubble-trapping" },
          { text: "节流防抖", link: "/jsstudy/throttle-debounce" },
          { text: "深浅拷贝", link: "/jsstudy/clone-deep" },
          { text: "ES6及ESNext规范", link: "/jsstudy/es6-esnext" },
          { text: "面向对象", link: "/jsstudy/obj-oriented" },
          { text: "前端缓存", link: "/jsstudy/cache" },
          { text: "前端网络", link: "/jsstudy/HTTP" }, // HTTP HTTPS
          { text: "前端安全", link: "/jsstudy/front-security" },
          { text: "垃圾回收机制", link: "/jsstudy/garbage-collect" }, // 内存泄漏
          { text: "前端性能优化", link: "/jsstudy/performance-opt" }, // 前端性能优化
          { text: "减少 if-else 的小技巧", link: "/jsstudy/if-else-tips" },
          { text: "常见题目", link: "/jsstudy/fre-questions" },
          { text: "前端埋点上报", link: "/jsstudy/burial-point-report" },
        ],
      },
      {
        text: "工程化",
        link: "/webpackstudy",
        items: [
          { text: "什么是前端工程化", link: "/webpackstudy/whatIsEngine" },
          { text: "前端模块化", link: "/webpackstudy/module" },
          { text: "webpack基础", link: "/webpackstudy/webpack-basic" },
          { text: "webpack构建", link: "/webpackstudy/webpack" },
          {
            text: "webpack 中的module",
            link: "https://zhuanlan.zhihu.com/p/408195292",
          },
          {
            text: "webpack性能优化",
            link: "https://zhuanlan.zhihu.com/p/448738741",
          },
          { text: "webpack原理相关", link: "/webpackstudy/principle" },
          {
            text: "一步步实现webpack打包",
            link: "https://zhuanlan.zhihu.com/p/408733746",
          },
          { text: "ts基础及使用", link: "/webpackstudy/ts-basics" },
          { text: "前端项目husky使用", link: "/webpackstudy/husky" },
          { text: "微信小程序", link: "/webpackstudy/miniprogram" },
          { text: "项目通用封装", link: "/webpackstudy/project" },
          { text: "TS要看", link: "/webpackstudy/ts-need" },
        ],
      },
      {
        text: "Vue",
        link: "/vue",
        items: [
          { text: 'Vue2.0基础', link: '/vue/basicknowledge' },
          { text: 'Vue2.0进阶', link: '/vue/misnotes' },
          { text: 'Vue ssr', link: '/vue/ssr' },
          { text: 'Vue3.0基础', link: '/vue/vue3-basic' },
          { text: 'Vue3.0', link: '/vue/vue3' },
          { text: 'Vue3.0进阶', link: '/vue/vue3-impl' },
          { text: 'Vue 状态管理', link: '/vue/vue-status' },
          { text: 'vue-router', link: '/vue/vue-router' },
          { text: 'vuex性能问题', link: '/vue/vuex' },
          { text: 'Vue2.x VS Vue3.x', link: '/vue/compare' },
          { text: 'vue深入理解', link: '/vue/vue-principle' },
          { text: 'vue基础要看', link: '/vue/vue-attrs-listeners' },
        ],
      },
      {
        text: "React",
        link: "/react",
        items: [
          { text: "React 基础", link: "/react/react-basic" },
          { text: "React 进阶", link: "/react/react-advanced" },
          { text: "React 状态管理", link: "/react/status-manage" },
          { text: "React Context", link: "/react/react-context" },
          { text: "React 相关", link: "/react/react-relation" },
          { text: "React SSR", link: "/react/ssr" },
        ],
      },
      {
        text: "React Native",
        link: "/reactnative",
        items: [
          { text: 'React Native 环境搭建', link: '/reactnative/reactnative' },
          { text: 'React Native 常见问题', link: '/reactnative/rn-problem' }
        ],
      },
      {
        text: "Node.js",
        link: "/node",
        items: [
          { text: "Node.js基础", link: "/node/node-basic" },
          { text: "Node常用框架", link: "/node/node-frame" },
          { text: "Nodejs网络及部署", link: "/node/node-network" },
        ],
      },
      {
        text: "低代码",
        link: "/lowcode",
        items: [
          { text: "拖拽", link: "/lowcode/drag" },
          { text: "低代码平台", link: "/lowcode/lowcode" },
          { text: "低代码平台实现", link: "/lowcode/lowcode-impl" },
          { text: "可视化", link: "/lowcode/visualization" },
        ],
      },
      {
        text: "算法",
        link: "/algorithm",
        items: [
          { text: "排序算法", link: "/algorithm/sort" },
          { text: "双指针算法", link: "/algorithm/double-pointer" },
          { text: "二叉树", link: "/algorithm/binary-tree" },
          { text: "接雨水", link: "/algorithm/receive-rain" },
          { text: "动态规划", link: "/algorithm/dynamic-plan" },
          { text: "贪心算法", link: "/algorithm/greedy" },
          { text: "最长上升子序列", link: "/algorithm/longasc-sequence" },
          { text: "二分查找", link: "/algorithm/binary-search" },
          { text: "其他", link: "/algorithm/other" },
        ],
      },
      {
        text: "其他",
        link: "/other",
        items: [
          { text: "浏览器原理与pwa", link: "/other/browser-principle" },
          { text: "重绘回流", link: "/other/redraw-reflow" },
          { text: "前端兼容性问题", link: "/other/compatibility" },
          { text: "虚拟列表", link: "/other/virtual-list" },
          { text: "数据采集", link: "/other/data-collection" },
          { text: "websocket", link: "/other/websocket" },
          { text: "vue vs react", link: "/other/vue-react" },
          { text: "ESLint规范", link: "/other/ESLint" },
          { text: "ES6 实用语法", link: "/other/ES6" },
          { text: "优秀文章", link: "/other/excellentarticles" },
          { text: "个人总结", link: "/other/personal-summary" },
          { text: "uni-app", link: "/other/uniapp" },
          { text: "手写实现", link: "/other/handwritten-impl" },
          { text: "项目层面", link: "/other/project-broad" },
          { text: "svg", link: "/other/svg" },
          { text: "扩展性问题", link: "/other/extend.md" },
          { text: "移动端项目适配", link: "/other/mobile-adaptation.md" },
          { text: "复盘总结", link: "/other/review-and-summary.md" }
        ],
      },
      {
        text: "关于我",
        items: [
          { text: "Github", link: "https://github.com/hmyjyghh" },
          { text: "Gitee", link: "https://gitee.com/ghh_" },
          {
            text: "知乎",
            link: "https://www.zhihu.com/people/cool-62-29/columns",
          },
          { text: "博客", link: "https://hmyjyghh.github.io/" },
        ],
      },
    ],
    sidebar: "auto", // 侧边栏配置
    smoothScroll: true,
  },
  // plugins: {
  //   'sitemap': {
  //     hostname: 'https://hmyjyghh.github.io/'
  //   }
  // }
  plugins: [
    [
      "@vuepress/plugin-pwa",
      {
        serviceWorker: true,
        updatePopup: {
          message: "有新内容可用，点击刷新页面。",
          buttonText: "刷新",
        },
      },
    ],
  ],
};
